import { Router } from '@angular/router';
import { Component, OnInit, Input } from '@angular/core';

@Component({
  selector: 'app-custom-search-bar',
  templateUrl: './custom-search-bar.component.html',
  styleUrls: ['./custom-search-bar.component.scss'],
})
export class CustomSearchBarComponent implements OnInit {

  @Input() tagData: any;
  constructor(
    public router: Router,
  ) { }

  ngOnInit() {}

  onClick() {
    const searchPath =  '/navSearch';
    this.router.navigate([searchPath], { queryParams: { obj: JSON.stringify(this.tagData.data.searchInput) } });
  }
}
